package common.Forum;

import android.content.Context;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.ListFragment;

public class AdapterForum extends FragmentPagerAdapter {

	Context c;
	ListFragment lf = new ListFragment();

	public AdapterForum (Context context, FragmentManager fm) {
		super(fm);
		c = context;
	}

	@Override
	public ListFragment getItem(int position) {
		
		switch (position) {
		case 0:
			return lf = ViewThread.newInstance(c);
		case 1:
			return lf = ViewReplies.newInstance(c);
		}
		
		return null;
	}
	
	@Override
	public int getCount() {
		return 2;
	}
	
	public String getTag(int position) {
		return null;
	}

}